chore(deps): update dependency mermaid to v11.15.0 [security]#1081
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update dependency mermaid to v11.15.0 [security]#1081renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
11.12.2→11.15.0Mermaid: Improper sanitization of
classDefin state diagrams leads to HTML injectionCVE-2026-41149 / GHSA-ghcm-xqfw-q4vr
More information
Details
Impact
Under the default configuration, Mermaid state diagram's
classDefallow DOM injection that escapes the SVG, although<script>tags are removed, preventing XSS.Proof-of-concept
Patches
Workarounds
If you can not update to a patched version, setting
"securityLevel": "sandbox"will prevent this, by rendering the mermaid diagram in a sandboxed<iframe>.Credits
Thanks to @zsxsoft from @KeenSecurityLab for reporting this vulnerability.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Mermaid: Improper sanitization of
classDefsin diagrams leads to CSS injectionCVE-2026-41148 / GHSA-xcj9-5m2h-648r
More information
Details
Details
The state diagram and any other diagram type that routes user-controlled style strings through createCssStyles parser for Mermaid v11.14.0 and earlier captures
classDefvalues with an unrestricted regex:The value passes unsanitized through
addStyleClass()->createCssStyles()->style.innerHTML(mermaidAPI.ts:418). A}in the value closes the generated CSS selector, and everything after becomes a new CSS rule on the page.PoC
Live demo:
https://mermaid.live/edit#pako:eNpFjzFvgzAQhf-KdVNbEcBgMHhtlkqtOnSJKi8ONsYKBmRMlRTx3-skanvTfbp7996t0IxSAYPZC6_2Rmgn7O4rQ00v5nmvWnRG29OKjqI5aTcug9wZK7RiaHH9A4fO-4kliVXSiFibqbvEzWjvnHxo_fI6vR3e6cGXyX2qTcvhcYMItDMSmHeLisAqZ8UVYeUDQhx8p6ziwEIrhTtx4MNVM4nhcxztrywE0h2wVvRzoGWS_z_8rahBKvcckntgmN5OAFvhDIzUNCZZQXCR5nVaZkUEF2BVFpOcEkoxxhUuyRbB980yjStapKHqoKFlhvPtB7BFZEU
Patches
This has been patched in:
Workarounds
Setting
"securityLevel": "sandbox"will prevent this, by rendering the mermaid diagram in a sandboxed<iframe>.Impact
Enables page defacement, user tracking via
url()callbacks, and DOM attribute exfiltration via CSS:has()selectors.Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Mermaid Gantt Charts are vulnerable to an Infinite Loop DoS
CVE-2026-41150 / GHSA-6m6c-36f7-fhxh
More information
Details
Impact
Mermaid v11.14.0 and earlier are vulnerable to a denial-of-service attack when rendering gantt charts, if they use the
excludesattribute to exclude all dates.Example:
mermaid.parseis unaffected, unless you then call theganttDb.getTasks()(which is called when rendering a diagram).Patches
This has been patched in:
Workarounds
There are no workarounds available without updating to a newer version of mermaid.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Mermaid: Improper sanitization of configuration leads to CSS injection
CVE-2026-41159 / GHSA-87f9-hvmw-gh4p
More information
Details
Impact
Mermaid's default configuration allows injecting CSS that applies outside of the Mermaid diagram via the
fontFamily,themeCSS, andaltFontFamilyconfiguration options.Live demo: mermaid.live
Example code:
The injected CSS exploits stylis's
&(scope reference) handling.:not(&)escapes the#mermaid-xxxautomatic scoping, applying styles to all page elements. Global at-rules (@font-face,@keyframes,@counter-style) are also injectable as stylis hoists them to top level.This allows page defacement and DOM attribute exfiltration via CSS
:has()selectors.Patches
Workarounds
If you can't upgrade mermaid, you can set the
secureconfig value in the mermaid config to avoid allowing diagrams to modifyfontFamily,themeCSS,altFontFamily, andthemeVariables.Setting
"securityLevel": "sandbox"will also prevent this.Credits
Reported by @zsxsoft on behalf of @KeenSecurityLab
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
mermaid-js/mermaid (mermaid)
v11.15.0Compare Source
Minor Changes
#7174
0aca217Thanks @milesspencer35! - feat(sequence): Add support for decimal start and increment values in theautonumberdirective#7512
8e17492Thanks @aruncveli! - feat(flowchart): add datastore shapeIn Data flow diagrams, a datastore/warehouse/file/database is used to represent data persistence. It is denoted by a rectangle with only top and bottom borders, and can be used in flowcharts with
A@{ shape: datastore, label: "Datastore" }.#6440
9ad8ddeThanks @yordis, @lgazo! - feat: add Event Modeling diagram#7707
27db774Thanks @txmxthy! - feat(architecture): expose four fcose layout knobs forarchitecture-betadiagrams (nodeSeparation,idealEdgeLengthMultiplier,edgeElasticity,numIter) so authors can tune layout density and spread overlapping siblings without changing diagram source#7604
bf9502fThanks @M-a-c! - feat(class): add nested namespace support for class diagrams via dot notation and syntactic nestingIf you have namespaces in class diagrams that use
.s already and want to render them without nesting (≤v11.14.0 behaviour), you can use setclass.hierarchicalNamespaces=falsein your mermaid config:#7272
88cdd3dThanks @xinbenlv! - feat(sankey): add outlined label style, configurable nodeWidth/nodePadding, and custom node colorsPatch Changes
#7737
e9b0f34Thanks @ashishjain0512! - fix: prevent unbalanced CSS styles in classDefs#7737
37ff937Thanks @ashishjain0512! - fix: create CSS styles using the CSSOMThis removes some invalid CSS and normalizes some CSS formatting.
#7508
bfe60ccThanks @biiab! - fix(stateDiagram):end notenow only closes a note when used on a new line#7737
faafb5dThanks @ashishjain0512! - fix(gantt): add iteration limit forexcludesfield#7737
65f8be2Thanks @ashishjain0512! - fix: disallow some CSS at-rules in custom CSS#7726
1502f32Thanks @aloisklink! - fix(wardley): fix unnecessary sanitization of text#7578
1f98db8Thanks @Gaston202! - fix(class): self-referential class multiplicity labels no longer rendered multiple timesFixes #7560. Resolves an issue where cardinality labels on self-referential class relationships were rendered three times due to edge splitting in the dagre layout. The fix ensures that each sub-edge only carries its relevant label positions.
#7592
2343e38Thanks @knsv-bot! - fix(sequence): add background box behind alt/else section title labels in sequence diagrams#7589
7fb9509Thanks @NYCU-Chung! - fix(block): prevent column widths from shrinking when mixing different column spans#7632
3f9e0f1Thanks @ekiauhce! - fix(sequence): correct messageAlign label position for right-to-left arrows in sequence diagrams#7642
7a8fb85Thanks @tractorjuice! - fix(wardley): allow hyphens in unquoted component namesMulti-word names containing hyphens — e.g.
real-time processing,end-user,on-call engineer— now parse without quoting, bringing the grammar in line with the OnlineWardleyMaps (OWM) convention.A->B(no-space arrow) still tokenises correctly.#7523
5144ed4Thanks @darshanr0107! - fix(block): Arrow blocks in block-beta diagrams not spanning the specified number of columns when using:nsyntax.#7262
13d9bfaThanks @darshanr0107! - fix(block): Ensure block diagram hexagon blocks respect column spanning syntax#7684
e14bb88Thanks @aloisklink! - fix: loosenuuiddependency range to allow v14Mermaid does not use any of the vulnerable code in CVE-2026-41907,
but this allows users to silence any
npm auditalerts on it.#7633
9217c0dThanks @Felix-Garci! - fix(block): add support for all arrow types in block diagrams#7587
5e7eb62Thanks @MaddyGuthridge! - chore: drop lodash-es in favour of es-toolkit#7693
afaf306Thanks @dull-bird! - fix(quadrant-chart): allow CJK, emoji, Latin-1 accented characters, and other non-ASCII text in unquoted axis/quadrant/point labels.Previously the lexer only matched ASCII
[A-Za-z]+for text tokens, even though the grammar referencedUNICODE_TEXT. Bare Chinese, Japanese, Korean, emoji, and accented Latin characters in labels caused a parse error. Added a[^\x00-\x7F]+lexer rule to emitUNICODE_TEXTand included it in thealphaNumTokengrammar rule.Fixes #7120.
#7737
4755553Thanks @ashishjain0512! - fix: improve D3 types for mermaidAPI funcs#7737
6476973Thanks @ashishjain0512! - fix: handle&when namespacing CSS rules#7520
8c1a0c1Thanks @RodrigojndSantos! - fix(stateDiagram): comments starting with one%are no longer treated as commentsSwitch to using two
%%if you want to write a comment.Updated dependencies [
7a8fb85,675a64c]:v11.14.0Compare Source
Thanks to our awesome mermaid community that contributed to this release: @ashishjain0512, @tractorjuice, @autofix-ci[bot], @aloisklink, @knsv, @kibanana, @chandershekhar22, @khalil, @ytatsuno, @sidharthv96, @github-actions[bot], @dripcoding, @knsv-bot, @jeroensmink98, @Alex9583, @GhassenS, @omkarht, @darshanr0107, @leentaylor, @lee-treehouse, @veeceey, @turntrout, @Mermaid-Chart, @BambioGaming, Claude
Releases
@mermaid-js/examples@1.2.0
Minor Changes
efe218a- add new TreeView diagrammermaid@11.14.0
Minor Changes
#7526
efe218a- Add Wardley Maps diagram type (beta)Adds Wardley Maps as a new diagram type to Mermaid (available as
wardley-beta). Wardley Maps are visual representations of business strategy that help map value chains and component evolution.Features:
Implementation includes parser, D3.js renderer, unit tests, E2E tests, and comprehensive documentation.
#7526
efe218a- feat: implement neo look styling for state diagrams#7526
efe218a- feat: implement neo look support for sequence diagrams with drop shadows, and enhanced styling#7526
efe218a- feat: addrandomizeconfig option for architecture diagrams, defaulting tofalsefor deterministic layout#7526
efe218a- feat: Add option to change timeline direction#7526
efe218a- Fix duplicate SVG element IDs when rendering multiple diagrams on the same page. Internal element IDs (nodes, edges, markers, clusters) are now prefixed with the diagram's SVG element ID across all diagram types. Custom CSS or JS using exact ID selectors like#arrowheadshould use attribute-ending selectors like[id$="-arrowhead"]instead.#7526
efe218a- feat: implement neo look styling for ER diagrams#7526
efe218a- feat: implement neo look styling for requirement diagrams#7526
efe218a- feat: add theme support for data label colour in xy chart#7526
efe218a- feat: implement neo look styling for mindmap diagrams#7526
efe218a- feat: implement neo look for mermaid flowchart diagrams#7526
efe218a- feat: implement neo look and themes for class diagram#7526
efe218a- feat: add showDataLabelOutsideBar option for xy chart#7526
efe218a- feat: implement neo look support for timeline diagram with drop shadows, additoinal redux themes and enhanced styling#7526
efe218a- feat: implement neo look and themes for gitGraph diagram#7526
efe218a- add new TreeView diagramPatch Changes
#7526
efe218a- add link to ishikawa diagram on mermaid.js.org#7526
efe218a- docs: document valid duration token formats in gantt.md#7526
efe218a- fix: ER diagram parsing when using "1" as entity identifier on right sideThe parser was incorrectly tokenizing the second "1" in patterns like
a many to 1 1:because the lookahead rule only checked for alphabetic characters after whitespace, not digits. Added a new lookahead pattern"1"(?=\s+[0-9])to correctly identify the cardinality alias before a numeric entity name.Fixes #7472
#7526
efe218a- fix: scope cytoscape label style mapping to edges with labels to prevent console warnings#7526
efe218a- fix: support inline annotation syntax in class diagrams (class Shape <>)#7526
efe218a- fix: Align branch label background with text for multi-line labels in LR GitGraph layout#7526
efe218a- fix: preserve cause hierarchy when ishikawa effect is indented more than causes#7526
efe218a- refactor: remove unused createGraphWithElements function and add regression test for open edge arrowheads#7526
efe218a- fix: Prevent long pie chart titles from being clipped by expanding the viewBox#7526
efe218a- fix: prevent sequence diagram hang when "as" is used without a trailing space in participant declarations#7526
efe218a- fix: warn whenstylestatement targets a non-existent node in flowcharts#7526
efe218a- fix: group state diagram SVG children under single root element#7526
efe218a- fix: Allow :::className syntax inside composite state blocks#7526
efe218aThanks @aloisklink, @BambioGaming! - fix: prevent escaping<and&whenhtmlLabels: false#7526
efe218a- fix: treemap title and labels use theme-aware colors for dark backgroundsUpdated dependencies [
efe218a]:@mermaid-js/parser@1.1.0
Minor Changes
efe218a- add new TreeView diagram@mermaid-js/tiny@11.14.0
Minor Changes
#7526
efe218a- Add Wardley Maps diagram type (beta)Adds Wardley Maps as a new diagram type to Mermaid (available as
wardley-beta). Wardley Maps are visual representations of business strategy that help map value chains and component evolution.Features:
Implementation includes parser, D3.js renderer, unit tests, E2E tests, and comprehensive documentation.
#7526
efe218a- feat: implement neo look styling for state diagrams#7526
efe218a- feat: implement neo look support for sequence diagrams with drop shadows, and enhanced styling#7526
efe218a- feat: addrandomizeconfig option for architecture diagrams, defaulting tofalsefor deterministic layout#7526
efe218a- feat: Add option to change timeline direction#7526
efe218a- Fix duplicate SVG element IDs when rendering multiple diagrams on the same page. Internal element IDs (nodes, edges, markers, clusters) are now prefixed with the diagram's SVG element ID across all diagram types. Custom CSS or JS using exact ID selectors like#arrowheadshould use attribute-ending selectors like[id$="-arrowhead"]instead.#7526
efe218a- feat: implement neo look styling for ER diagrams#7526
efe218a- feat: implement neo look styling for requirement diagrams#7526
efe218a- feat: add theme support for data label colour in xy chart#7526
efe218a- feat: implement neo look styling for mindmap diagrams#7526
efe218a- feat: implement neo look for mermaid flowchart diagrams#7526
efe218a- feat: implement neo look and themes for class diagram#7526
efe218a- feat: add showDataLabelOutsideBar option for xy chart#7526
efe218a- feat: implement neo look support for timeline diagram with drop shadows, additoinal redux themes and enhanced styling#7526
efe218a- feat: implement neo look and themes for gitGraph diagram#7526
efe218a- add new TreeView diagramPatch Changes
#7526
efe218a- add link to ishikawa diagram on mermaid.js.org#7526
efe218a- docs: document valid duration token formats in gantt.md#7526
efe218a- fix: ER diagram parsing when using "1" as entity identifier on right sideThe parser was incorrectly tokenizing the second "1" in patterns like
a many to 1 1:because the lookahead rule only checked for alphabetic characters after whitespace, not digits. Added a new lookahead pattern"1"(?=\s+[0-9])to correctly identify the cardinality alias before a numeric entity name.Fixes #7472
#7526
efe218a- fix: scope cytoscape label style mapping to edges with labels to prevent console warnings#7526
efe218a- fix: support inline annotation syntax in class diagrams (class Shape <>)#7526
efe218a- fix: Align branch label background with text for multi-line labels in LR GitGraph layout#7526
efe218a- fix: preserve cause hierarchy when ishikawa effect is indented more than causes#7526
efe218a- refactor: remove unused createGraphWithElements function and add regression test for open edge arrowheads#7526
efe218a- fix: Prevent long pie chart titles from being clipped by expanding the viewBox#7526
efe218a- fix: prevent sequence diagram hang when "as" is used without a trailing space in participant declarations#7526
efe218a- fix: warn whenstylestatement targets a non-existent node in flowcharts#7526
efe218a- fix: group state diagram SVG children under single root element#7526
efe218a- fix: Allow :::className syntax inside composite state blocks#7526
efe218aThanks @aloisklink, @BambioGaming! - fix: prevent escaping<and&whenhtmlLabels: false#7526
efe218a- fix: treemap title and labels use theme-aware colors for dark backgroundsUpdated dependencies [
efe218a]:v11.13.0Compare Source
Minor Changes
#7352
d6db0b0Thanks @remcohaszing! - feat: Export theAsyncIconLoader,SyncIconLoader, andIconLoadertypes.#5932
cdacb0bThanks @exoego! - feat: Add venn-beta diagram#6789
73e9849Thanks @omkarht! - feat: Add half-arrowheads (solid & stick) and central connection support#7387
acce4dbThanks @exoego! - feat: Add Ishikawa diagram (ishikawa-beta)#6995
9745f32Thanks @darshanr0107! - feat: Deprecateflowchart.htmlLabelsin favor of root-levelhtmlLabelsin Mermaid config#5814
2dd29beThanks @kairi003! - feat: allow to put notes in namespaces on classDiagramPatch Changes
#7075
96a766dThanks @darshanr0107! - fix: Prevent HTML tags from being escaped in sandbox label rendering#6843
32723b2Thanks @saurabhg772244! - fix: Support edge animation in hand drawn look#7453
a60e615Thanks @darshanr0107! - fix: ER diagram edge label positioning#6989
1a9d45aThanks @darshanr0107! - fix: Resolved parsing error where direction TD was not recognized within subgraphs#7178
96ca7c0Thanks @omkarht! - fix(treemap): Fixed treemap classDef style application to properly apply user-defined styles#7076
60f6331Thanks @darshanr0107! - fix: Correct viewBox casing and make SVGs responsive#7055
fa15ce8Thanks @darshanr0107! - fix: Improve participant parsing and prevent recursive loops on invalid syntax#7276
33c7c72Thanks @darshanr0107! - fix: respectmarkdownAutoWrap: falseto prevent text auto-wrapping in flowchart markdown labels withhtmlLabelsenabled.Markdown labels with
markdownAutoWrap: false, htmlLabels: falseset doesn't workcorrectly.
#7416
3c069b5Thanks @Crafter-Y! - fix: architecture diagram lines should now have the correct length#6995
9745f32Thanks @darshanr0107! - fix: Support thehtmlLabelsMermaid config value whenever possible#7293
a408b55Thanks @darshanr0107! - fix: Prevent browser hang when using multiline accDescr in XY charts#6119
712c1ecThanks @NealGooch! - fix: correct block positioning when nested blocks span multiple columns#7424
981a62eThanks @knsv! - fix: correct BT orientation arc sweep flags in gitGraph drawArrow()Swapped SVG arc sweep-flag values in the BT (bottom-to-top) orientation branches of
drawArrow()so curves bend in the correct direction. Affects both rerouting and non-rerouting code paths for merge and non-merge arrows.Resolves #6593
#7430
a4bb0b5Thanks @knsv! - fix: allow colons in stateDiagram-v2 transition and state description text#7432
b0f9d5bThanks @knsv! - fix: derive taskTextDarkColor from doneTaskBkgColor in dark theme for readable done-task text#7456
981fbb8Thanks @knsv-bot! - fix(gantt): restore readable outside-text color for done tasks in dark mode#7139
93aa657Thanks @omkarht! - revert: restore original hexagon and roundedRect implementations#7136
6bc6617Thanks @omkarht! - feat: add alias support for new participant syntax of sequence diagrams#7375
9d0669aThanks @kaigritun! - fix(er): recognize '1' cardinality alias before relationship operators#7275
7eed6a1Thanks @darshanr0107! - fix: changecreateLabelto callcreateTextThis adds support for KaTeX and FontAwesome icons loaded via iconpacks in some
older labels. There are some small changes in formatting due to standardizing this code.
#7265
2000680Thanks @omkarht! - fix: prevent unintended opacity on SVG aws icons containing rect elements#7139 [
b7c66a2](https://rConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.